<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta name="viewport"
	content="width=device-width,user-scalable=no, initial-scale=1">
<title>CRM</title>
<link rel="stylesheet" type="text/css" href="../static/azxcrm/css/wap/aui.css" th:href="@{/azxcrm/css/wap/aui.css}" />
<link rel="stylesheet" type="text/css" href="../static/azxcrm/css/wap/index.css" th:href="@{/azxcrm/css/wap/index.css}" />
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_835360_ni6hp1i077i.css" />
<link rel="stylesheet" type="text/css" href="../static/azxcrm/css/wap/work.css" th:href="@{/azxcrm/css/wap/work.css}" />
 <script src="../static/azxcrm/js/wap/jquery-3.3.1.min.js" type="text/javascript" th:src="@{/azxcrm/js/wap/jquery-3.3.1.min.js}"
	charset="utf-8"></script>
<!--<script src="js/flexible.js" type="text/javascript" charset="utf-8"></script>-->
</head>
<body>
<header class="aui-bar aui-bar-nav">
    <div class="aui-title">工作台</div>
</header>
<section class="aui-grid">
	<div class="aui-content aui-margin-b-15" th:if="${dispatcher == true or dispatcherManager == true}">
	    <ul class="aui-list aui-list-in">		       	
	        <li class="aui-list-item">
	        	<a class="aui-list-link" th:href="@{/wap/wapFollowOrder(userId=${user.userId})}">
	        	<div class="aui-list-item-inner aui-list-item-arrow">
	                <h3><img src="azxcrm/image/wap/myorder.png" alt="image"/>待分配订单</h3>
	                <div class="aui-list-item-right">
	                    <div class="aui-badge" style="position:relative;top:0; left:0" th:text="${orderCount}"></div>
	                </div>
	            </div>
	        	</a>
	        </li>
	    </ul>
	</div>
	
	<div class="aui-content aui-margin-b-15 dsp" th:if="${examine}!=1">
	    <ul class="aui-list aui-media-list">
	        <li class="aui-list-header">
    			<h3><img src="azxcrm/image/wap/dsp.png" alt="image"/>待审批事项</h3>
    			<a th:href="@{/wap/examineList}" class="g-a">
	        	<div class="g-ckgd">查看更多</div>
    		   </a>
	        </li>
	    </ul>
	    <ul class="aui-list aui-media-list dsp2" th:each="exam : ${examine}">
	        <li class="aui-list-item">
	            <div class="aui-media-list-item-inner">
	                <div class="aui-list-item-inner">
	                    <div class="aui-list-item-text">
	                        <div class="aui-list-item-title g-fqr state">发起人：<span th:text="${exam.salesUserName}"></span></div>
	                        <div class="aui-list-item-title g-fqr">审批类型：退单</div>
	                    </div>
	                </div>
	            </div>
	        </li>
	        <li class="aui-list-item">
	            <div class="aui-media-list-item-inner">
	                <div class="aui-list-item-inner">
	                    <div class="aui-list-item-text">
	                        <div class="u-time"><img src="azxcrm/image/wap/time.png" alt="image"/>发起时间：<span th:text="${exam.updateTime}"></span></div>
	                        <a th:href="@{/wap/approve(orderId=${exam.orderId},taskId=${exam.taskId})}"><div class="aui-text">
		                	   <div class="aui-label aui-label-danger aui-label-outlined" id="g-ckxq" >查看详情</div>
		                    </div></a>
	                    </div>
	                </div>
	            </div>
	        </li>
	   </ul>
	</div>
	
	<div class="aui-content aui-margin-b-15">
		<ul class="aui-list aui-list-in">
            <li class="aui-list-header">
                <h3><img src="azxcrm/image/wap/dgjsx.jpg" alt="image"/>待跟进订单</h3>
                <a th:href="@{/wap/wapOrderFollowDetail}" class="g-a">
                    <div class="g-ckgd">查看更多</div>
                </a>
            </li>
        </ul>
	<div class="wait-fp" th:each="orderDispatch:${orderDispatchList}">      
        <ul class="aui-list aui-media-list" th:if="${orderDispatch.orderModifyRecord.modifyType} != 1 and ${orderDispatch.order.orderStatus} == 2">
            <a th:href="@{/wap/wapOrderDetail(orderId=${orderDispatch.order.orderId},status=0)}">
               <li class="aui-list-item">
                   <div class="aui-media-list-item-inner">
                       <div class="aui-list-item-inner">
                           <div class="aui-list-item-text">
                               <div class="aui-list-item-title"  th:text="${orderDispatch.order.orderNum}"></div>
                               <div class="aui-list-item-title g-fqr state">订单类型：
                               <span th:text="${orderDispatch.order.typeName}"></span></div>
                           </div>
                       </div>
                   </div>
               </li>
               <li class="aui-list-item">
                   <div class="aui-list-item-inner g-flex">
                           <div class="aui-list-item-title s-name"><img src="../static/azxcrm/image/wap/head-img.jpg" th:src="@{/azxcrm/image/wap/head-img.jpg}">
                           <span th:text="${orderDispatch.customerClue.customerName}" style="margin-right:6px;"></span><span th:text="${orderDispatch.customerClue.customerCellphone}"></span></div>
                           <div class="aui-text">
                                <div class="aui-label aui-label-danger aui-label-outlined" id="g-ckxq2">查看详情</div>
                           </div>       
                   </div>
               </li>
               <li class="aui-list-item">
                   <div class="aui-media-list-item-inner">
                       <div class="aui-list-item-inner">
                           <div class="aui-list-item-text">
                               <div class="u-time"><img src="../static/azxcrm/image/wap/time.png" th:src="@{/azxcrm/image/wap/time.png}">剩余保有时间：
                               <span th:text="${orderDispatch.dateNum}"></span>天</div>
                           </div>
                       </div>
                   </div>
               </li>
                </a> 
          </ul>
          
          <ul class="aui-list aui-media-list" th:if="${orderDispatch.orderModifyRecord.modifyType} == 1 and ${orderDispatch.unformedCause} != null">
            <a th:href="@{/wap/wapOrderReason(orderId=${orderDispatch.order.orderId},status=0,dispatchId=${orderDispatch.dispatchId})}">
               <li class="aui-list-item">
                   <div class="aui-media-list-item-inner">
                       <div class="aui-list-item-inner">
                           <div class="aui-list-item-text">
                               <div class="aui-list-item-title"  th:text="${orderDispatch.order.orderNum}"></div>
                               <div class="aui-list-item-title g-fqr state">订单类型：
                               <span th:text="${orderDispatch.order.typeName}"></span></div>
                           </div>
                       </div>
                   </div>
               </li>
               <li class="aui-list-item">
                   <div class="aui-list-item-inner g-flex">
                           <div class="aui-list-item-title s-name"><img src="../static/azxcrm/image/wap/head-img.jpg" th:src="@{/azxcrm/image/wap/head-img.jpg}">
                           <span th:text="${orderDispatch.customerClue.customerName}" style="margin-right:6px;"></span><span th:text="${orderDispatch.customerClue.customerCellphone}"></span></div>
                           <div class="aui-text">
                                <div class="aui-label aui-label-danger aui-label-outlined" id="g-ckxq2">查看详情</div>
                           </div>       
                   </div>
               </li>
               <li class="aui-list-item">
                   <div class="aui-media-list-item-inner">
                       <div class="aui-list-item-inner">
                           <div class="aui-list-item-text">
                               <div class="u-time"><img src="../static/azxcrm/image/wap/time.png" th:src="@{/azxcrm/image/wap/time.png}">30天保护期已到，请填写未成单原因</div>
                           </div>
                       </div>
                   </div>
               </li>
                </a> 
          </ul>
                 
      </div>
        </div>
	<div th:include="include::footer"></div>
</section>
	<footer class="aui-bar aui-bar-tab" id="footer">
		<a class="aui-bar-tab-item aui-active" tapmode> <i
			class="iconfont icon-cangku"></i>
			<div class="aui-bar-tab-label">工作台</div>
		</a> <a th:href="@{/wap/wapCustomer}" class="aui-bar-tab-item" tapmode> <i
			class="iconfont icon-qunzu"></i>
			<div class="aui-bar-tab-label">客户</div>
		</a> <a th:href="@{/wap/wapMy}" class="aui-bar-tab-item" tapmode> <i
			class="iconfont icon-gerentouxiang"></i>
			<div class="aui-bar-tab-label">我的</div>
		</a>
	</footer>
</body>
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
<script src="../static/azxcrm/js/wap/indexWap.js" th:src="@{/azxcrm/js/wap/indexWap.js}"></script>
</html>
<script>
     var waitlist = document.getElementsByClassName('wait-fp');
     for(var i=0;i<waitlist.length;i++){
    	 if(i<5){
    		 waitlist[i].style.display='block';
    	 }else{
    		 waitlist[i].style.display='none';
    	 }
     }
</script>
<script>
var list = $('.dsp2');
$('.dsp2').eq(0).css('display','block')
	

</script>
</html>
